\(\int (a+b \log (c (d+\frac {e}{f+g x})^p)) \, dx\) [639]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 50 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=a x+\frac {b (f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )}{g}+\frac {b e p \log (e+d (f+g x))}{d g} \]

[Out]

a*x+b*(g*x+f)*ln(c*(d+e/(g*x+f))^p)/g+b*e*p*ln(e+d*(g*x+f))/d/g

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2533, 2498, 269, 31} \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=a x+\frac {b (f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )}{g}+\frac {b e p \log (d (f+g x)+e)}{d g} \]

[In]

Int[a + b*Log[c*(d + e/(f + g*x))^p],x]

[Out]

a*x + (b*(f + g*x)*Log[c*(d + e/(f + g*x))^p])/g + (b*e*p*Log[e + d*(f + g*x)])/(d*g)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2533

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*((f_.) + (g_.)*(x_))^(n_))^(p_.)]*(b_.))^(q_.), x_Symbol] :> Dist[1/g, Su
bst[Int[(a + b*Log[c*(d + e*x^n)^p])^q, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IGtQ[q
, 0] && (EqQ[q, 1] || IntegerQ[n])

Rubi steps \begin{align*} \text {integral}& = a x+b \int \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right ) \, dx \\ & = a x+\frac {b \text {Subst}\left (\int \log \left (c \left (d+\frac {e}{x}\right )^p\right ) \, dx,x,f+g x\right )}{g} \\ & = a x+\frac {b (f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )}{g}+\frac {(b e p) \text {Subst}\left (\int \frac {1}{\left (d+\frac {e}{x}\right ) x} \, dx,x,f+g x\right )}{g} \\ & = a x+\frac {b (f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )}{g}+\frac {(b e p) \text {Subst}\left (\int \frac {1}{e+d x} \, dx,x,f+g x\right )}{g} \\ & = a x+\frac {b (f+g x) \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )}{g}+\frac {b e p \log (e+d (f+g x))}{d g} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.40 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=a x-b e g p \left (\frac {f \log (f+g x)}{e g^2}-\frac {(e+d f) \log (e+d f+d g x)}{d e g^2}\right )+b x \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right ) \]

[In]

Integrate[a + b*Log[c*(d + e/(f + g*x))^p],x]

[Out]

a*x - b*e*g*p*((f*Log[f + g*x])/(e*g^2) - ((e + d*f)*Log[e + d*f + d*g*x])/(d*e*g^2)) + b*x*Log[c*(d + e/(f +
g*x))^p]

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.54

method result size
default \(a x +b \left (\ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{p}\right ) x +e g p \left (-\frac {f \ln \left (g x +f \right )}{g^{2} e}+\frac {\left (d f +e \right ) \ln \left (d g x +d f +e \right )}{e \,g^{2} d}\right )\right )\) \(77\)
parts \(a x +b \left (\ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{p}\right ) x +e g p \left (-\frac {f \ln \left (g x +f \right )}{g^{2} e}+\frac {\left (d f +e \right ) \ln \left (d g x +d f +e \right )}{e \,g^{2} d}\right )\right )\) \(77\)
parallelrisch \(-\frac {b \left (-x \ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{p}\right ) d \,g^{2} p -\ln \left (g x +f \right ) e g \,p^{2}-\ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{p}\right ) d f g p -\ln \left (c \left (\frac {d g x +d f +e}{g x +f}\right )^{p}\right ) e g p \right )}{d \,g^{2} p}+a x\) \(116\)

[In]

int(a+b*ln(c*(d+e/(g*x+f))^p),x,method=_RETURNVERBOSE)

[Out]

a*x+b*(ln(c*((d*g*x+d*f+e)/(g*x+f))^p)*x+e*g*p*(-f/g^2/e*ln(g*x+f)+(d*f+e)/e/g^2/d*ln(d*g*x+d*f+e)))

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.52 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=\frac {b d g p x \log \left (\frac {d g x + d f + e}{g x + f}\right ) - b d f p \log \left (g x + f\right ) + b d g x \log \left (c\right ) + a d g x + {\left (b d f + b e\right )} p \log \left (d g x + d f + e\right )}{d g} \]

[In]

integrate(a+b*log(c*(d+e/(g*x+f))^p),x, algorithm="fricas")

[Out]

(b*d*g*p*x*log((d*g*x + d*f + e)/(g*x + f)) - b*d*f*p*log(g*x + f) + b*d*g*x*log(c) + a*d*g*x + (b*d*f + b*e)*
p*log(d*g*x + d*f + e))/(d*g)

Sympy [A] (verification not implemented)

Time = 0.76 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.14 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=a x + b \left (\begin {cases} x \log {\left (c \left (\frac {e}{f}\right )^{p} \right )} & \text {for}\: d = 0 \wedge g = 0 \\\frac {f \log {\left (c \left (\frac {e}{f + g x}\right )^{p} \right )}}{g} + p x + x \log {\left (c \left (\frac {e}{f + g x}\right )^{p} \right )} & \text {for}\: d = 0 \\x \log {\left (c \left (d + \frac {e}{f}\right )^{p} \right )} & \text {for}\: g = 0 \\\frac {f \log {\left (c \left (d + \frac {e}{f + g x}\right )^{p} \right )}}{g} + x \log {\left (c \left (d + \frac {e}{f + g x}\right )^{p} \right )} + \frac {e p \log {\left (d f + d g x + e \right )}}{d g} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(a+b*ln(c*(d+e/(g*x+f))**p),x)

[Out]

a*x + b*Piecewise((x*log(c*(e/f)**p), Eq(d, 0) & Eq(g, 0)), (f*log(c*(e/(f + g*x))**p)/g + p*x + x*log(c*(e/(f
 + g*x))**p), Eq(d, 0)), (x*log(c*(d + e/f)**p), Eq(g, 0)), (f*log(c*(d + e/(f + g*x))**p)/g + x*log(c*(d + e/
(f + g*x))**p) + e*p*log(d*f + d*g*x + e)/(d*g), True))

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.40 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=-b e g p {\left (\frac {f \log \left (g x + f\right )}{e g^{2}} - \frac {{\left (d f + e\right )} \log \left (d g x + d f + e\right )}{d e g^{2}}\right )} + b x \log \left (c {\left (d + \frac {e}{g x + f}\right )}^{p}\right ) + a x \]

[In]

integrate(a+b*log(c*(d+e/(g*x+f))^p),x, algorithm="maxima")

[Out]

-b*e*g*p*(f*log(g*x + f)/(e*g^2) - (d*f + e)*log(d*g*x + d*f + e)/(d*e*g^2)) + b*x*log(c*(d + e/(g*x + f))^p)
+ a*x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 176 vs. \(2 (50) = 100\).

Time = 0.32 (sec) , antiderivative size = 176, normalized size of antiderivative = 3.52 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx={\left (\frac {e^{2} p \log \left (\frac {d g x + d f + e}{g x + f}\right )}{d g^{2} - \frac {{\left (d g x + d f + e\right )} g^{2}}{g x + f}} + \frac {e^{2} \log \left (c\right )}{d g^{2} - \frac {{\left (d g x + d f + e\right )} g^{2}}{g x + f}} + \frac {e^{2} p \log \left (-d + \frac {d g x + d f + e}{g x + f}\right )}{d g^{2}} - \frac {e^{2} p \log \left (\frac {d g x + d f + e}{g x + f}\right )}{d g^{2}}\right )} b {\left (\frac {d f g}{e^{2}} - \frac {{\left (d f + e\right )} g}{e^{2}}\right )} + a x \]

[In]

integrate(a+b*log(c*(d+e/(g*x+f))^p),x, algorithm="giac")

[Out]

(e^2*p*log((d*g*x + d*f + e)/(g*x + f))/(d*g^2 - (d*g*x + d*f + e)*g^2/(g*x + f)) + e^2*log(c)/(d*g^2 - (d*g*x
 + d*f + e)*g^2/(g*x + f)) + e^2*p*log(-d + (d*g*x + d*f + e)/(g*x + f))/(d*g^2) - e^2*p*log((d*g*x + d*f + e)
/(g*x + f))/(d*g^2))*b*(d*f*g/e^2 - (d*f + e)*g/e^2) + a*x

Mupad [B] (verification not implemented)

Time = 1.50 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.22 \[ \int \left (a+b \log \left (c \left (d+\frac {e}{f+g x}\right )^p\right )\right ) \, dx=a\,x+b\,x\,\ln \left (c\,{\left (d+\frac {e}{f+g\,x}\right )}^p\right )-\frac {b\,f\,p\,\ln \left (f+g\,x\right )}{g}+\frac {b\,p\,\ln \left (e+d\,f+d\,g\,x\right )\,\left (e+d\,f\right )}{d\,g} \]

[In]

int(a + b*log(c*(d + e/(f + g*x))^p),x)

[Out]

a*x + b*x*log(c*(d + e/(f + g*x))^p) - (b*f*p*log(f + g*x))/g + (b*p*log(e + d*f + d*g*x)*(e + d*f))/(d*g)